package com.dzm.xgb.core.controller.admin;


import com.dzm.common.result.R;
import com.dzm.common.util.JwtUtils;
import com.dzm.xgb.core.hfb.RequestHelper;
import com.dzm.xgb.core.pojo.entity.LendItem;
import com.dzm.xgb.core.pojo.vo.InvestVO;
import com.dzm.xgb.core.service.LendItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 标的出借记录表 前端控制器
 * </p>
 *
 * @author Dzm
 * @since 2024-08-27
 */
@RestController
@RequestMapping("/admin/core/lendItem")
public class AdminLendItemController {

    @Autowired
    private LendItemService lendItemService;

    /**
     * 根据标的id获取所有标的项
     * @param id
     * @return
     */
    @GetMapping("/getLendItemList/{id}")
    public R getLendItemList(@PathVariable("id") Long id) {
        List<LendItem> lendItems = lendItemService.getLendItemList(id);

        return R.ok().data("list", lendItems);
    }

}

